Skip to content

fix(nix): add pyright to devshell - #1415

Merged
xarvex merged 2 commits into
mainfrom
fix-nix-add-pyright
Jul 2, 2026
Merged

fix(nix): add pyright to devshell#1415
xarvex merged 2 commits into
mainfrom
fix-nix-add-pyright

Conversation

@Computerdores

Copy link
Copy Markdown
Collaborator

Summary

If you don't have pyright installed on the system, the commit hook in the dev shell will fail.
This PR adds pyright to the devshell to fix that issue.

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality
    • PyInstaller executable

@Computerdores
Computerdores requested a review from xarvex July 2, 2026 18:34
@Computerdores Computerdores moved this to 🏓 Ready for Review in TagStudio Development Jul 2, 2026
@xarvex

xarvex commented Jul 2, 2026

Copy link
Copy Markdown
Member

Just did a quick switch-a-roo to put this in nativeBuildInputs (see this answer for why). Thanks!

@xarvex
xarvex merged commit 00b6f91 into main Jul 2, 2026
12 checks passed
@github-project-automation github-project-automation Bot moved this from 🏓 Ready for Review to ✅ Done in TagStudio Development Jul 2, 2026
@Computerdores

Copy link
Copy Markdown
Collaborator Author

Just did a quick switch-a-roo to put this in nativeBuildInputs (see this answer for why). Thanks!

Could you elaborate on that? Because I always use buildInputs for all my devshells and have never had problems with that and the post seems to suggest that it just doesn't make a difference

@CyanVoxel CyanVoxel added Type: Installation Installing, building, and/or launching the program System: Linux For Linux/BSD distributions labels Jul 4, 2026
@Computerdores
Computerdores deleted the fix-nix-add-pyright branch July 5, 2026 22:20
@xarvex

xarvex commented Aug 1, 2026

Copy link
Copy Markdown
Member

Sorry, totally missed this when it came in!

So, my answer was about to be that outside of cross-compiling, there are other distinctions when it comes to *Inputs such as in regard to shell hooks. However, that means I missed the literal first line which states clearly that for mkShell it doesn't matter. Looking in the source for mkShell, that tracks, everything is outputted together: nixpkgs/pkgs/build-support/mkshell/default.nix

This also reminded me of the existence of inputsFrom and packages. packages is the mkShell-specific attribute that I would wager was added in order to side-step the confusion of *Inputs in a shell, I would recommend using that for most cases.
inputsFrom is very special in that it lets you use the dependencies from a package, the reason we don't use it in this shell is because it doesn't include the transitive dependencies needed for Qt to work (and which we have to wrap the Python executable for, which that wouldn't do either). That, and what it would include is all the Python dependencies from nixpkgs, which in this case is undesirable. Otherwise, I would recommend it.

TL;DR: I was wrong, and I am switching the shell to use a single packages list.

xarvex added a commit that referenced this pull request Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

System: Linux For Linux/BSD distributions Type: Installation Installing, building, and/or launching the program

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants